package designPattern.creationpattern.prototype.deepCopy;

import lombok.*;

/**
 * @author wei.zhao
 * @description: 简历
 * @date 2021年12月09日 16:12
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Resume implements Cloneable {
    private String name;//姓名
    private String job;//岗位
    private String salary;//薪资
    private Witness witness;//证人

    @Override
    protected Resume clone() {
        Resume resume = null;
        try {
            resume = (Resume) super.clone();
            resume.setWitness(this.getWitness().clone());
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return resume;
    }

}
